import request from '../utils/request.js'

export default {
    //根据id查询用户未读消息
    SubmitGetMessageNum(){
        return request({
            method: 'get',
            url: `/userservice/userInfo/countUnread`,
        })
    },
    //发送消息
    SubmitChatting(chat){
        return request({
            method: 'post',
            url: `/userservice/userInfo/addChat`,
            data:chat
        })
    },
    //获取聊天用户信息
    SubmitGetChatting(page,pageSize,chat){
        return request({
            method: 'post',
            url: `/userservice/userInfo/queryPage`,
            data:{
                page:page,
                pageSize:pageSize,
                queryInfo:chat
            }
        })
    },
    //获取被回复用户信息
    SubmitGetFidChatting(fid){
        return request({
            method: 'get',
            url: `/userservice/userInfo/queryByFid?fid=${fid}`,
        })
    },
    //将消息改为已查看
    SubmitOneDonot(){
        return request({
            method: 'put',
            url: `/userservice/userInfo/checkChat`,
        })
    },
}